Current software development environments often have an editor, a compiler, debugger, and builder for use in software development. This functionality is incorporated into a single software product termed an “integrated development environment” (IDE). Some IDEs also contain a link into an event stream that lets a developer examine a stream of events and see how her software performs in view of the events. An event is typically an atomic event, such as a text control of a user interface receiving a typed character. Each character typed in the text control generates its own event. Thus, typing the name “Mike” in the text control generates the following TypeText events: TypeText(“M”), TypeText(“i”), TypeText(“k”), and TypeText(“e”). If the user makes a mistake while typing, a TypeText(<backspace>) will appear in the stream of TypeText events.
A developer will often want to generate test code to test a new program. The test code allows a developer to generate a simulated sequence of user-generated events, without requiring a user to actually generate the events each time the new program is tested. Current software tools generate source code that is based on each received event. The generated source code is difficult to read, lengthy, and not efficiently written.